home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / zendisk1.zip / LST9-2.ASM < prev    next >
Assembly Source File  |  1990-02-15  |  575b  |  25 lines

  1. ;
  2. ; *** Listing 9-2 ***
  3. ;
  4. ; An example of initializing multiple memory variables
  5. ; to the same value by making the value an immediate
  6. ; operand to each instruction. Immediate operands
  7. ; increase instruction size by 1 to 2 bytes, and preclude
  8. ; use of the accumulator-specific direct-addressing
  9. ; form of MOV.
  10. ;
  11.     jmp    Skip
  12. ;
  13. MemVar1    dw    ?
  14. MemVar2    dw    ?
  15. MemVar3    dw    ?
  16. ;
  17. Skip:
  18.     call    ZTimerOn
  19.     rept    1000
  20.     mov    [MemVar1],0ffffh ;store 0ffffh to each memory
  21.     mov    [MemVar2],0ffffh ; variable as an immediate
  22.     mov    [MemVar3],0ffffh ; operand
  23.     endm
  24.     call    ZTimerOff
  25.